package com.probox.common.entity.vo.centre.order;

import cn.hutool.core.date.DateUtil;
import com.probox.common.core.utils.SecurityUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author Kite
 * @date 2021/6/24
 */
@Data
@ApiModel(description="订单数据请求")
public class OrderQueryVo {
    @ApiModelProperty(value = "开始统计时间")
    private Date startTime;
    @ApiModelProperty(value = "结束统计时间")
    private Date endTime;
    @ApiModelProperty(value = "过去开始统计时间")
    private Date startTimeFormerly;
    @ApiModelProperty(value = "过去结束统计时间")
    private Date endTimeFormerly;
    @ApiModelProperty(value = "供应商Id")
    private Long supplierId;
    @ApiModelProperty(value = "平台Id")
    private Long platformId;
    @ApiModelProperty(value = "查询数据类型")
    private String type;

    private List<Long> depts;

    private Long storeId;

    private List<Long> storeList;



    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Date getStartTime() {
        if (startTime!=null){
            startTime = DateUtil.beginOfDay(startTime);
        }
        return  startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        if (endTime!=null){
            endTime = DateUtil.endOfDay(endTime);
        }
        return  endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getStartTimeFormerly() {
        return startTimeFormerly;
    }

    public void setStartTimeFormerly(Date startTimeFormerly) {
        this.startTimeFormerly = startTimeFormerly;
    }

    public Date getEndTimeFormerly() {
        return endTimeFormerly;
    }

    public void setEndTimeFormerly(Date endTimeFormerly) {
        this.endTimeFormerly = endTimeFormerly;
    }

    public Long getSupplierId() {
        return   SecurityUtils.getSupplierId();
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getPlatformId() {

        return  SecurityUtils.getPlatformId();
    }

    public void setPlatformId(Long platformId) {
        this.platformId = platformId;
    }
}
